home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
os2
/
adaptor.zip
/
ADAPT.ZIP
/
adaptor
/
examples
/
bsp2
/
flowm.f9
< prev
next >
Wrap
Text File
|
1993-06-15
|
2KB
|
65 lines
program flow
implicit none
c dimension of image: x_dim x y_dim
integer x_dim, y_dim, points
parameter (x_dim = 128, y_dim = 128)
integer x_h, y_h
parameter (x_h = x_dim / 2, y_h = y_dim / 2)
parameter (points = 4096)
integer i, j
real x_coord(points), y_coord(points), dx (points), dy (points)
integer image_buffer (x_dim, y_dim )
cmf$ layout image_buffer (:host)
integer image (x_dim, y_dim)
integer x (points), y (points)
logical mask (points)
integer color (points)
integer dummy
i = x_dim
j = y_dim
call x_display_init (x_dim,y_dim)
x_coord = 0
y_coord = 0
do i = 1, points !parallel
x_coord(i)=sin(i*2*3.1415926*8/real(points))
$ *(real(i)/real(points))
end do
do i = 1,points
y_coord(i)=cos(i*2*3.1415926*8/real(points))
$ *(real(i)/real(points))
end do
x_coord = 0.5*x_coord
y_coord = 0.5*y_coord
do i = 1, 250
dx = x_coord + (i/25.0) * y_coord * x_coord
dy = - y_coord - (i/50.0) * x_coord * (y_coord-x_coord)
x_coord = x_coord + 0.01 * dx
y_coord = y_coord + 0.01 * dy
c display all points
image = 50
do j = 1, points !parallel
x(j) = x_h + x_coord(j) * x_h
y(j) = y_h + y_coord(j) * y_h
mask (j) = ((x(j) .gt. 0) .and. (x(j) .le. x_dim) .and.
$ (y(j) .gt. 0) .and. (y(j) .le. y_dim))
color (j) = 255
end do
c
c global send with a mask
c
c scatter for a two dimensional structure with mask
c
c send only if x, y coordinates are in range
c
call global_send (image, x, y, color, mask)
image_buffer = image
call x_show_bild (image_buffer)
end do
read *, dummy
end